/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;
import DAO.ValidarRutDAO;
import DTO.*;
import java.util.Date;
import javax.swing.JOptionPane;
/**
 *
 * @author User
 */
public class ModuloAdmiEliminarUsuario extends javax.swing.JFrame {
    //USUARIO SESION
    usuarioDTO user;
    //USUARIO ELIMINAR
    usuarioDTO usuario = new usuarioDTO();
    
    public ModuloAdmiEliminarUsuario(usuarioDTO user) {
        this.user = user;
        initComponents();
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        pnlIngreseRutGarante = new javax.swing.JPanel();
        lblRut = new javax.swing.JLabel();
        txtRutBuscarEliminarUsuario = new javax.swing.JTextField();
        btnBuscarEliminarUsuario = new javax.swing.JButton();
        pnlIngresarDatosGarante = new javax.swing.JPanel();
        pnlDatosPersonales = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtApellPatEliminarUsuario = new javax.swing.JTextField();
        txtApellMatEliminarUsuar = new javax.swing.JTextField();
        txtRutEliminarUsuario = new javax.swing.JTextField();
        txtNombreElimUsu = new javax.swing.JTextField();
        rdMascEliminarUsuar = new javax.swing.JRadioButton();
        rdFemeninoEliminarUsuario = new javax.swing.JRadioButton();
        jcFecha_Nacimiento = new com.toedter.calendar.JDateChooser();
        pnlDireParticular = new javax.swing.JPanel();
        txtPassElimUsuario = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        cmbEstadoEliminarUsuario = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        txtUsuarioElimUsuario = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        txtTipoUsuarEliminarUsuarios = new javax.swing.JTextField();
        pnlNumContacto = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        txtTelPartEliminarUsuario = new javax.swing.JTextField();
        txtTrabajoElimUsuario = new javax.swing.JTextField();
        txtTelMovElimUsuario = new javax.swing.JTextField();
        txtFaxElimUsuario = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        txtMailEliminarUsuario = new javax.swing.JTextField();
        btnEliminarUsuario = new javax.swing.JButton();
        btnMenuEliminarUsuario = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel1.setText("ELIMINAR  USUARIO");

        pnlIngreseRutGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT USUARIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblRut.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblRut.setText("RUT");

        btnBuscarEliminarUsuario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarEliminarUsuario.setText("BUSCAR");
        btnBuscarEliminarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarEliminarUsuarioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGaranteLayout = new javax.swing.GroupLayout(pnlIngreseRutGarante);
        pnlIngreseRutGarante.setLayout(pnlIngreseRutGaranteLayout);
        pnlIngreseRutGaranteLayout.setHorizontalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblRut)
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtRutBuscarEliminarUsuario)
                    .addComponent(btnBuscarEliminarUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlIngreseRutGaranteLayout.setVerticalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRut)
                    .addComponent(txtRutBuscarEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarEliminarUsuario)
                .addContainerGap())
        );

        pnlIngresarDatosGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESAR DATOS ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 12), java.awt.Color.blue)); // NOI18N

        pnlDatosPersonales.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("RUT");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("APELLIDO PATERNO");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("APELLIDO MATERNO");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("NOMBRE");

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("FECHA NACIMIENTO");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("SEXO");

        txtApellPatEliminarUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatEliminarUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatEliminarUsuario.setEnabled(false);

        txtApellMatEliminarUsuar.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatEliminarUsuar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatEliminarUsuar.setEnabled(false);

        txtRutEliminarUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtRutEliminarUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutEliminarUsuario.setEnabled(false);

        txtNombreElimUsu.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreElimUsu.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreElimUsu.setEnabled(false);

        rdMascEliminarUsuar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        rdMascEliminarUsuar.setSelected(true);
        rdMascEliminarUsuar.setText("MASCULINO");
        rdMascEliminarUsuar.setEnabled(false);

        rdFemeninoEliminarUsuario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        rdFemeninoEliminarUsuario.setText("FEMENINO");
        rdFemeninoEliminarUsuario.setEnabled(false);

        javax.swing.GroupLayout pnlDatosPersonalesLayout = new javax.swing.GroupLayout(pnlDatosPersonales);
        pnlDatosPersonales.setLayout(pnlDatosPersonalesLayout);
        pnlDatosPersonalesLayout.setHorizontalGroup(
            pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel8))
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersonalesLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(rdMascEliminarUsuar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rdFemeninoEliminarUsuario)
                                .addGap(8, 8, 8))
                            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                                .addGap(28, 28, 28)
                                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(txtNombreElimUsu, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtApellMatEliminarUsuar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jcFecha_Nacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel3))
                                .addGap(32, 32, 32)
                                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(txtRutEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtApellPatEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addContainerGap(82, Short.MAX_VALUE))))
        );
        pnlDatosPersonalesLayout.setVerticalGroup(
            pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtRutEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtApellPatEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(txtApellMatEliminarUsuar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNombreElimUsu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jcFecha_Nacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rdMascEliminarUsuar)
                    .addComponent(rdFemeninoEliminarUsuario)
                    .addComponent(jLabel8))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlDireParticular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "OTROS DATOS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtPassElimUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtPassElimUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtPassElimUsuario.setEnabled(false);

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("PASSWORD");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("ESTADO DE USUARIO");

        cmbEstadoEliminarUsuario.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ACTIVO", "INACTIVO" }));
        cmbEstadoEliminarUsuario.setEnabled(false);

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("USUARIO");

        txtUsuarioElimUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtUsuarioElimUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtUsuarioElimUsuario.setEnabled(false);

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("TIPO DE USUARIO");

        txtTipoUsuarEliminarUsuarios.setBackground(new java.awt.Color(255, 255, 102));
        txtTipoUsuarEliminarUsuarios.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTipoUsuarEliminarUsuarios.setEnabled(false);

        javax.swing.GroupLayout pnlDireParticularLayout = new javax.swing.GroupLayout(pnlDireParticular);
        pnlDireParticular.setLayout(pnlDireParticularLayout);
        pnlDireParticularLayout.setHorizontalGroup(
            pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDireParticularLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9)
                    .addComponent(jLabel13))
                .addGap(18, 18, 18)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbEstadoEliminarUsuario, 0, 150, Short.MAX_VALUE)
                    .addComponent(txtTipoUsuarEliminarUsuarios))
                .addGap(72, 72, 72)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlDireParticularLayout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtPassElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlDireParticularLayout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addGap(60, 60, 60)
                        .addComponent(txtUsuarioElimUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)))
                .addContainerGap(20, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        pnlDireParticularLayout.setVerticalGroup(
            pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireParticularLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(cmbEstadoEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUsuarioElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addGap(18, 18, 18)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtTipoUsuarEliminarUsuarios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel13))
                    .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtPassElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel10)))
                .addContainerGap(42, Short.MAX_VALUE))
        );

        pnlNumContacto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CONTACTO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("TEL. PARTICULAR");

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("TEL. TRABAJO ");

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("TEL. MOVIL");

        jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel17.setText("FAX");

        txtTelPartEliminarUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtTelPartEliminarUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelPartEliminarUsuario.setEnabled(false);

        txtTrabajoElimUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtTrabajoElimUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTrabajoElimUsuario.setEnabled(false);

        txtTelMovElimUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtTelMovElimUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelMovElimUsuario.setEnabled(false);

        txtFaxElimUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtFaxElimUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFaxElimUsuario.setEnabled(false);

        jLabel26.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel26.setText("MAIL");

        txtMailEliminarUsuario.setBackground(new java.awt.Color(255, 255, 102));
        txtMailEliminarUsuario.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtMailEliminarUsuario.setEnabled(false);

        javax.swing.GroupLayout pnlNumContactoLayout = new javax.swing.GroupLayout(pnlNumContacto);
        pnlNumContacto.setLayout(pnlNumContactoLayout);
        pnlNumContactoLayout.setHorizontalGroup(
            pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumContactoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17)
                    .addComponent(jLabel26))
                .addGap(18, 18, 18)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtFaxElimUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                    .addComponent(txtTelMovElimUsuario)
                    .addComponent(txtTrabajoElimUsuario)
                    .addComponent(txtTelPartEliminarUsuario)
                    .addComponent(txtMailEliminarUsuario))
                .addContainerGap(98, Short.MAX_VALUE))
        );
        pnlNumContactoLayout.setVerticalGroup(
            pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumContactoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtTelPartEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtTrabajoElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(txtTelMovElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtFaxElimUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(txtMailEliminarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlIngresarDatosGaranteLayout = new javax.swing.GroupLayout(pnlIngresarDatosGarante);
        pnlIngresarDatosGarante.setLayout(pnlIngresarDatosGaranteLayout);
        pnlIngresarDatosGaranteLayout.setHorizontalGroup(
            pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                        .addComponent(pnlDatosPersonales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlNumContacto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(pnlDireParticular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlIngresarDatosGaranteLayout.setVerticalGroup(
            pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlDatosPersonales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlNumContacto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(pnlDireParticular, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        btnEliminarUsuario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnEliminarUsuario.setText("ELIMINAR");
        btnEliminarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarUsuarioActionPerformed(evt);
            }
        });

        btnMenuEliminarUsuario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuEliminarUsuario.setText("VOLVER AL MENU");
        btnMenuEliminarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuEliminarUsuarioActionPerformed(evt);
            }
        });

        jLabel12.setText("MENÚ ADMINISTRADOR\\ELIMINAR USUARIO");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel12))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(26, 26, 26)
                                .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(47, 47, 47)
                                .addComponent(jLabel1))))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(pnlIngresarDatosGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(178, 178, 178)
                        .addComponent(btnEliminarUsuario)
                        .addGap(109, 109, 109)
                        .addComponent(btnMenuEliminarUsuario)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(16, 16, 16)
                        .addComponent(jLabel12)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlIngresarDatosGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEliminarUsuario)
                    .addComponent(btnMenuEliminarUsuario))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        setSize(new java.awt.Dimension(733, 620));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuscarEliminarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarEliminarUsuarioActionPerformed
       if(ValidarRutDAO.validarRut(this.txtRutBuscarEliminarUsuario.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
        if (txtRutBuscarEliminarUsuario.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Por favor, ingrese el Rut del Usuario.");
        }
        else
        {
          usuario = LOGIN.Administrador.BuscarUsuarioPorRut(txtRutBuscarEliminarUsuario.getText());
            if (usuario.getRut_usua().equals("")) {
                javax.swing.JOptionPane.showMessageDialog(null, "Usuario no existe!.");
                txtRutBuscarEliminarUsuario.setText("");
            }
            else
            {
                txtRutEliminarUsuario.setText(usuario.getRut_usua());
                txtApellPatEliminarUsuario.setText(usuario.getApell_paterno_usua());
                txtApellMatEliminarUsuar.setText(usuario.getApell_materno_usua());
                txtNombreElimUsu.setText(usuario.getNombre_usua());
                Date aux = DTO.ConversionFechas.convertToDate(usuario.getFech_nac_usua());
                jcFecha_Nacimiento.setDate(aux);
                if (usuario.getSexo_usua().equalsIgnoreCase("Masculino")) {
                    rdMascEliminarUsuar.setSelected(true);
                }
                else
                {
                    rdFemeninoEliminarUsuario.setSelected(true);
                }
                txtTelPartEliminarUsuario.setText(String.valueOf(usuario.getTel_part_usua()));
                txtTrabajoElimUsuario.setText(String.valueOf(usuario.getTel_trab_usua()));
                txtTelMovElimUsuario.setText(String.valueOf(usuario.getTel_mov_usua()));
                txtFaxElimUsuario.setText(String.valueOf(usuario.getFax_usua_int()));
                txtMailEliminarUsuario.setText(usuario.getE_mail_usua());
                if (usuario.getEst_usuario_usua().equalsIgnoreCase("Activo")) {
                    cmbEstadoEliminarUsuario.setSelectedIndex(0);
                }
                else
                {
                    cmbEstadoEliminarUsuario.setSelectedIndex(0);
                }
                txtTipoUsuarEliminarUsuarios.setText(usuario.getPerfil().getNom_perfil());
                txtUsuarioElimUsuario.setText(usuario.getUsuario_usua());  
                txtPassElimUsuario.setText(usuario.getContrasena_usua());
                
                txtRutBuscarEliminarUsuario.setEditable(false);
                btnBuscarEliminarUsuario.setEnabled(false);
            }
        }}else
       {
           javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
       }
    }//GEN-LAST:event_btnBuscarEliminarUsuarioActionPerformed

    private void btnMenuEliminarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuEliminarUsuarioActionPerformed
        MenuAdministrador menu = new MenuAdministrador(user);
        menu.setVisible(true);
        ModuloAdmiEliminarUsuario.this.dispose();
    }//GEN-LAST:event_btnMenuEliminarUsuarioActionPerformed

    private void btnEliminarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarUsuarioActionPerformed
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Esta seguro de eliminar este Usuario?", "Eliminar Usuario", JOptionPane.OK_CANCEL_OPTION);
        if (respuesta == 0) {
            LOGIN.Administrador.EliminarUsuario(usuario);
            javax.swing.JOptionPane.showMessageDialog(null, "Usuario eliminado!");
            MenuAdministrador menu = new MenuAdministrador(user);
            menu.setVisible(true);
            ModuloAdmiEliminarUsuario.this.dispose();
        }
        else
        {
            
        }
    }//GEN-LAST:event_btnEliminarUsuarioActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(ModuloAdmiEliminarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(ModuloAdmiEliminarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(ModuloAdmiEliminarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(ModuloAdmiEliminarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new ModuloAdmiEliminarUsuario().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscarEliminarUsuario;
    private javax.swing.JButton btnEliminarUsuario;
    private javax.swing.JButton btnMenuEliminarUsuario;
    private javax.swing.JComboBox cmbEstadoEliminarUsuario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private com.toedter.calendar.JDateChooser jcFecha_Nacimiento;
    private javax.swing.JLabel lblRut;
    private javax.swing.JPanel pnlDatosPersonales;
    private javax.swing.JPanel pnlDireParticular;
    private javax.swing.JPanel pnlIngresarDatosGarante;
    private javax.swing.JPanel pnlIngreseRutGarante;
    private javax.swing.JPanel pnlNumContacto;
    private javax.swing.JRadioButton rdFemeninoEliminarUsuario;
    private javax.swing.JRadioButton rdMascEliminarUsuar;
    private javax.swing.JTextField txtApellMatEliminarUsuar;
    private javax.swing.JTextField txtApellPatEliminarUsuario;
    private javax.swing.JTextField txtFaxElimUsuario;
    private javax.swing.JTextField txtMailEliminarUsuario;
    private javax.swing.JTextField txtNombreElimUsu;
    private javax.swing.JTextField txtPassElimUsuario;
    private javax.swing.JTextField txtRutBuscarEliminarUsuario;
    private javax.swing.JTextField txtRutEliminarUsuario;
    private javax.swing.JTextField txtTelMovElimUsuario;
    private javax.swing.JTextField txtTelPartEliminarUsuario;
    private javax.swing.JTextField txtTipoUsuarEliminarUsuarios;
    private javax.swing.JTextField txtTrabajoElimUsuario;
    private javax.swing.JTextField txtUsuarioElimUsuario;
    // End of variables declaration//GEN-END:variables
}
